import Vue from 'vue'
import Router from 'vue-router'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      redirect: '/userMainInfo',
      meta: {
        requireAuth: true
      }
    },
    {
      path: '/home',
      name: 'Home',
      component: () => import(/* webpackChunkName: "home" */'../components/common/Home'),
      // redirect: '/dashboard',
      meta: {
        requireAuth: true
      },
      children: [
        {
          path: '/manageRepairTeam',
          name: '维修小组管理',
          component: () => import('../components/page/manager/manageRepairTeam'),
          meta: {
            title: '维修小组管理', requireAuth: true
          }
        },
        {
          path: '/userMainInfo',
          name: '个人信息',
          component: () => import('../components/page/userMainInfo'),
          meta: {
            title: '个人信息', requireAuth: true
          }
        },
        {
          path: '/PolicyReleaseByUeditor',
          name: 'PolicyReleaseByUeditor',
          component: () => import('../components/page/Policy/PolicyReleaseByUeditor'),
          meta: {
            title: '富文本编辑器发布政策', requireAuth: true
          }
        },
        {
          path: '/HousingBasicInformationManagement',
          name: 'housingBasicInformationManagement',
          component: () => import('../components/page/HouseRental/HousingBasicInformationManagement'),
          meta: {
            title: '房屋出租基本信息管理', requireAuth: true
          }
        },
        {
          path: '/BaiduMap',
          name: 'BaiduMap',
          component: () => import('../components/page/echarts/MyBaiduMap'),
          meta: {
            title: '地图点查看', requireAuth: true
          }
        },
        {
          path: '/HouseRentalQualificationReview',
          component: () => import('../components/page/HouseRental/HouseRentalQualificationReview'),
          meta: {
            title: '房屋出租资质审核', requireAuth: true
          }
        },
        {
          path: '/RentalPersonnelInformationManagement',
          component: () => import('../components/page/HouseRental/RentalPersonnelInformationManagement'),
          meta: {
            title: '租房人员信息管理', requireAuth: true
          }
        },
        {
          path: '/PolicyRelease',
          component: () => import('../components/page/Policy/PolicyRelease'),
          meta: {
            title: '政策发布', requireAuth: true
          }
        },
        {
          path: '/PageManager',
          component: () => import('../components/page/Policy/PageManager'),
          meta: {
            title: '已发布文章管理', requireAuth: true
          }
        },
        {
          path: '/villageMainInfo',
          component: () => import('../components/page/echarts/villageMainInfo'),
          meta: {
            title: '村庄详情', requireAuth: true
          }
        },
        {
          path: '/chinaMap',
          component: () => import(/* webpackChunkName: "chinaMap" */ '../components/page/echarts/chinaMap'),
          meta: { title: '村庄数据查看', requireAuth: true }
        },
        {
          path: '/RepairApplyEcharts',
          component: () => import('../components/page/Safety patrol inspection/SearchRepairApply'),
          meta: { title: '报修数据查看', requireAuth: true }
        },
        {
          path: '/RepairRequestTables',
          component: () => import('../components/page/Safety patrol inspection/Repair request Tables'),
          meta: { title: '报修查询', requireAuth: true }
        },
        {
          path: '/ImgUpload',
          component: () => import('../components/page/fileUpload_Download/ImgUpload'),
          meta: { title: '图片上传', requireAuth: true }
        },
        {
          path: '/ReportForRepair',
          component: () => import('../components/page/Safety patrol inspection/Report for repair'),
          meta: { title: '我要报修', requireAuth: true }
        }
      ]
    },
    {
      path: '/login',
      name: 'login',
      component: () => import('../components/Login')
    }
  ]
})
